<%@ Language=VBScript %> <%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %> <% Dim intMAX_COUNT intMAX_COUNT = 100 Function TranslateTransBy(s) If s = "[net use]" Then TranslateTransBy = "[" & GetText("TransByNetUse") & "]" ElseIf s = "[printer use]" Then TranslateTransBy = "[" & GetText("TransByPrintUse") & "]" ElseIf s = "[automatic]" Then TranslateTransBy = "[" & GetText("TransByAutomatic") & "]" ElseIf Instr(s, "[transfer from") = 1 Then TranslateTransBy = "[" & GetTextReplace("TransByTransFrom", Array(Mid(s, 15, Len(s)-15))) & "]" ElseIf Instr(s, "[transfer to") = 1 Then TranslateTransBy = "[" & GetTextReplace("TransByTransTo", Array(Mid(s, 13, Len(s)-13))) & "]" Else TranslateTransBy = s End If End Function %> <% Dim objPCWebAuditLog Set objPCWebAuditLog = CreateObject("PCWebAdmin.PCWebAuditLog") If objPCWebAuditLog.Error Then WriteErrorMessage objPCWebAuditLog.ErrorDescription End If Dim strUserName strUserName = Trim(Request("strUserName")) If Not gblnIsAdmin or Request("strMyLogs") <> "" Then strUserName = gstrLoggedInUser End If If strUserName <> "" Then objPCWebAuditLog.RestrictedOnUser(Trim(strUserName)) Response.Write "

" & GetTextReplace("RecentTransactionsFor", Array(strUserName)) & "

" WriteUserAdminLinks(strUserName) Call DisplayList(False) WriteUserAdminLinks(strUserName) Else 'objPCWebAuditLog.FullLog ' Defaults to this anyway Response.Write "

" & GetText("RecentTransactions") & "

" Call DisplayList(True) End If Set objPCWebAuditLog = Nothing Sub DisplayList(blnShowUser) Response.Write "
" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF If blnShowUser Then Response.Write "" & vbCRLF End If Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF objPCWebAuditLog.MoveFirst Dim intCount intCount = 0 do while ((not objPCWebAuditLog.EOF) and intCount < intMAX_COUNT) Response.Write "" & vbCRLF Response.Write "" & vbCRLF If blnShowUser Then Response.Write "" & vbCRLF End If If objPCWebAuditLog.TransactionAmount < 0 Then Response.Write "" & vbCRLF Else Response.Write "" & vbCRLF End If Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF objPCWebAuditLog.MoveNext intCount = intCount + 1 loop Response.Write "
" & GetText("Time") & "" & GetText("User") & "" & GetText("Amount") & "" & GetText("CreditAfterTrans") & "" & GetText("TransactedBy") & "" & GetText("Comment") & "
" & objPCWebAuditLog.TransactionTime & "" & objPCWebAuditLog.UserName & "" & objPCWebAuditLog.TransactionAmountText & "" & objPCWebAuditLog.TransactionAmountText & "" & objPCWebAuditLog.AmountAfterTransactionText & "" & TranslateTransBy(objPCWebAuditLog.TransactedBy) & "" & TranslateTransBy(objPCWebAuditLog.Comment) & "
" & vbCRLF Response.Write "
" & vbCRLF End Sub %>